﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace GnPlatForm.SqlServer
{
    public partial class MySqlConvert0
    {
        public static string getAbnormalReason(object value)
        {
            string ar = null;
            int len = Abnormal_Reason.GetUpperBound(0) + 1;
            for (int i = 0; i < len; i++)
            {
                if (Abnormal_Reason[i, 1].ToString() == value.ToString())
                    ar = Abnormal_Reason[i, 0].ToString();
            }
            return ar;
        }


        private static object[,] Abnormal_Reason= new object[,]{
        {"400 请求出现语法错误",4400},
        {"400 请求出现语法错误",6400},
        {"400 请求出现语法错误",7400},
        {"400 请求出现语法错误",5400},
        {"401 访问被拒绝",4401},
        {"401 访问被拒绝",6401},
        {"401 访问被拒绝",7401},
        {"401 访问被拒绝",5401},
        {"402 必需支付方能访问",4402},
        {"402 必需支付方能访问",6402},
        {"402 必需支付方能访问",7402},
        {"402 必需支付方能访问",5402},
        {"403 资源不可用",4403},
        {"403 资源不可用",6403},
        {"403 资源不可用",7403},
        {"403 资源不可用",5403},
        {"404 无法找到指定位置的资源",4404},
        {"404 无法找到指定位置的资源",6404},
        {"404 无法找到指定位置的资源",7404},
        {"404 无法找到指定位置的资源",5404},
        {"405 请求方法对指定资源不适用",4405},
        {"405 请求方法对指定资源不适用",6405},
        {"405 请求方法对指定资源不适用",7405},
        {"405 请求方法对指定资源不适用",5405},
        {"406 客户端浏览器对资源不兼容",4406},
        {"406 客户端浏览器对资源不兼容",6406},
        {"406 客户端浏览器对资源不兼容",7406},
        {"406 客户端浏览器对资源不兼容",5406},
        {"407 代理服务器认证所必需",4407},
        {"407 代理服务器认证所必需",6407},
        {"407 代理服务器认证所必需",7407},
        {"407 代理服务器认证所必需",5407},
        {"408 请求超时",4408},
        {"408 请求超时",6408},
        {"408 请求超时",7408},
        {"408 请求超时",5408},
        {"409 请求和当前资源状态冲突",4409},
        {"409 请求和当前资源状态冲突",6409},
        {"409 请求和当前资源状态冲突",7409},
        {"409 请求和当前资源状态冲突",5409},
        {"410 请求的资源已不可用",4410},
        {"410 请求的资源已不可用",6410},
        {"410 请求的资源已不可用",7410},
        {"410 请求的资源已不可用",5410},
        {"411 服务器需客户端发送content-length",4411},
        {"411 服务器需客户端发送content-length",6411},
        {"411 服务器需客户端发送content-length",7411},
        {"411 服务器需客户端发送content-length",5411},
        {"412 预处理失败",4412},
        {"412 预处理失败",6412},
        {"412 预处理失败",7412},
        {"412 预处理失败",5412},
        {"413 请求实体太大",4413},
        {"413 请求实体太大",6413},
        {"413 请求实体太大",7413},
        {"413 请求实体太大",5413},
        {"414 请求的URI过长",4414},
        {"414 请求的URI过长",6414},
        {"414 请求的URI过长",7414},
        {"414 请求的URI过长",5414},
        {"415 不被支持的媒体类型",4415},
        {"415 不被支持的媒体类型",6415},
        {"415 不被支持的媒体类型",7415},
        {"415 不被支持的媒体类型",5415},
        {"416 请求范围不满足",4416},
        {"416 请求范围不满足",6416},
        {"416 请求范围不满足",7416},
        {"416 请求范围不满足",5416},
        {"417 执行失败",4417},
        {"417 执行失败",6417},
        {"417 执行失败",7417},
        {"417 执行失败",5417},
        {"500 服务器内部错误",4500},
        {"500 服务器内部错误",6500},
        {"500 服务器内部错误",7500},
        {"500 服务器内部错误",5500},
        {"501 服务器不支持实现请求的功能",4501},
        {"501 服务器不支持实现请求的功能",6501},
        {"501 服务器不支持实现请求的功能",7501},
        {"501 服务器不支持实现请求的功能",5501},
        {"502 服务器返回非法应答",4502},
        {"502 服务器返回非法应答",6502},
        {"502 服务器返回非法应答",7502},
        {"502 服务器返回非法应答",5502},
        {"503 服务不可用",4503},
        {"503 服务不可用",6503},
        {"503 服务不可用",7503},
        {"503 服务不可用",5503},
        {"504 网关超时",4504},
        {"504 网关超时",6504},
        {"504 网关超时",7504},
        {"504 网关超时",5504},
        {"505 WSP版本不支持",4505},
        {"505 WSP版本不支持",6505},
        {"505 WSP版本不支持",7505},
        {"505 WSP版本不支持",5505},
        {"APN接入拒绝－没有签约(222)",1222},
        {"Class 2不支持(0x03)",4003},
        {"Class 2不支持(0x03)",6003},
        {"Class 2不支持(0x03)",7003},
        {"Class 2不支持(0x03)",8003},
        {"Class 2不支持(0x03)",5003},
        {"DNS查询网络无响应",12901},
        {"DNS请求被拒绝(005)",12005},
        {"PDP创建过程掉线：网络原因",1903},
        {"PDP创建过程掉线：用户原因",1902},
        {"PDP创建网络无响应",1901},
        {"PDP更新过程掉线：网络原因",3903},
        {"PDP更新过程掉线：用户原因",3902},
        {"PDP更新网络无响应",3901},
        {"PDP删除网络无响应",2901},
        {"Ping网络无响应",13901},
        {"Push消息不能传送到指定目的(0xEC)",4236},
        {"Push消息不能传送到指定目的(0xEC)",6236},
        {"Push消息不能传送到指定目的(0xEC)",7236},
        {"Push消息不能传送到指定目的(0xEC)",8236},
        {"Push消息不能传送到指定目的(0xEC)",5236},
        {"Push消息由于资源短缺而放弃(0xED)",4237},
        {"Push消息由于资源短缺而放弃(0xED)",6237},
        {"Push消息由于资源短缺而放弃(0xED)",7237},
        {"Push消息由于资源短缺而放弃(0xED)",8237},
        {"Push消息由于资源短缺而放弃(0xED)",5237},
        {"Push消息终端内容类型不能处理(0xEE)",4238},
        {"Push消息终端内容类型不能处理(0xEE)",6238},
        {"Push消息终端内容类型不能处理(0xEE)",7238},
        {"Push消息终端内容类型不能处理(0xEE)",8238},
        {"Push消息终端内容类型不能处理(0xEE)",5238},
        {"Rrset不存在(008)",12008},
        {"RRset存在(007)",12007},
        {"SAR不支持(0x04)",4004},
        {"SAR不支持(0x04)",6004},
        {"SAR不支持(0x04)",7004},
        {"SAR不支持(0x04)",8004},
        {"SAR不支持(0x04)",5004},
        {"TCP连接重置：服务提供商原因",4906},
        {"TCP连接重置：服务提供商原因",6906},
        {"TCP连接重置：服务提供商原因",7906},
        {"TCP连接重置：服务提供商原因",9906},
        {"TCP连接重置：服务提供商原因",10906},
        {"TCP连接重置：服务提供商原因",11906},
        {"TCP连接重置：服务提供商原因",14906},
        {"TCP连接重置：服务提供商原因",5906},
        {"TCP连接重置：用户原因",4905},
        {"TCP连接重置：用户原因",6905},
        {"TCP连接重置：用户原因",7905},
        {"TCP连接重置：用户原因",9905},
        {"TCP连接重置：用户原因",10905},
        {"TCP连接重置：用户原因",11905},
        {"TCP连接重置：用户原因",14905},
        {"TCP连接重置：用户原因",5905},
        {"TFT操作句法错误(216)",1216},
        {"TFT操作句法错误(216)",3216},
        {"TFT操作语法错误(215)",1215},
        {"TFT操作语法错误(215)",3215},
        {"TID无效(0x02)",4002},
        {"TID无效(0x02)",6002},
        {"TID无效(0x02)",7002},
        {"TID无效(0x02)",8002},
        {"TID无效(0x02)",5002},
        {"WSP/HTTP上网掉线：网络原因",4903},
        {"WSP/HTTP上网掉线：网络原因",5903},
        {"WSP/HTTP上网掉线：用户原因",4902},
        {"WSP/HTTP上网掉线：用户原因",5902},
        {"WSP/HTTP网关连接无响应",9901},
        {"WSP/HTTP网关连接无响应",8901},
        {"WSP网关连接断开",8902},
        {"必选IE不正确(201)",1201},
        {"必选IE不正确(201)",3201},
        {"必选IE不正确(201)",2201},
        {"必选IE缺失(202)",1202},
        {"必选IE缺失(202)",3202},
        {"必选IE缺失(202)",2202},
        {"不存在PDP上下文(192)",3192},
        {"不存在PDP上下文(192)",2192},
        {"不支持WTP版本1(0x06)",4006},
        {"不支持WTP版本1(0x06)",6006},
        {"不支持WTP版本1(0x06)",7006},
        {"不支持WTP版本1(0x06)",8006},
        {"不支持WTP版本1(0x06)",5006},
        {"彩信发送过程掉线：网络原因",6903},
        {"彩信发送过程掉线：用户原因",6902},
        {"彩信发送网络无响应",6901},
        {"彩信接收过程掉线：网络原因",7903},
        {"彩信接收过程掉线：用户原因",7902},
        {"彩信接收网络无响应",7901},
        {"彩信接收终端异常",7904},
        {"发送地址不明确(0x84)",6132},
        {"服务不支持(200)",3200},
        {"服务不支持(200)",2200},
        {"服务拒绝－用户输入错误手机号码(0x82)",6130},
        {"服务器失败(002)",12002},
        {"会话被恢复(0xE3)",4227},
        {"会话被恢复(0xE3)",6227},
        {"会话被恢复(0xE3)",7227},
        {"会话被恢复(0xE3)",8227},
        {"会话被恢复(0xE3)",5227},
        {"会话断开(0xE1)",4225},
        {"会话断开(0xE1)",6225},
        {"会话断开(0xE1)",7225},
        {"会话断开(0xE1)",8225},
        {"会话断开(0xE1)",5225},
        {"会话挂起(0xE2)",4226},
        {"会话挂起(0xE2)",6226},
        {"会话挂起(0xE2)",7226},
        {"会话挂起(0xE2)",8226},
        {"会话挂起(0xE2)",5226},
        {"会话过程掉线：用户原因",10901},
        {"会话过程掉线：用户原因",11901},
        {"会话过程掉线：用户原因",14901},
        {"会话连接失败(0xE5)",4229},
        {"会话连接失败(0xE5)",6229},
        {"会话连接失败(0xE5)",7229},
        {"会话连接失败(0xE5)",8229},
        {"会话连接失败(0xE5)",5229},
        {"可选IE错误(203)",1203},
        {"可选IE错误(203)",3203},
        {"可选IE错误(203)",2203},
        {"临时容量溢出(0x07)",4007},
        {"临时容量溢出(0x07)",6007},
        {"临时容量溢出(0x07)",7007},
        {"临时容量溢出(0x07)",8007},
        {"临时容量溢出(0x07)",5007},
        {"内容不被接收－消息大小超出系统限制(0x87)",6135},
        {"请求格式错误(001)",12001},
        {"数据包过滤器句法错误(218)",1218},
        {"数据包过滤器句法错误(218)",3218},
        {"数据包过滤器语法错误(217)",1217},
        {"数据包过滤器语法错误(217)",3217},
        {"所有的动态PDP地址都被占用(211)",1211},
        {"网络错误(0xE9)",4233},
        {"网络错误(0xE9)",6233},
        {"网络错误(0xE9)",7233},
        {"网络错误(0xE9)",8233},
        {"网络错误(0xE9)",5233},
        {"网络问题(0x86)",6134},
        {"未定义错误(0x81)",6129},
        {"未知错误(0x00)",4000},
        {"未知错误(0x00)",6000},
        {"未知错误(0x00)",7000},
        {"未知错误(0x00)",8000},
        {"未知错误(0x00)",5000},
        {"未知的PDP地址或者PDP类型(220)",1220},
        {"未知或者漏配的APN(219)",1219},
        {"无法从主服务器得到数据（009）",12009},
        {"无法找到上下文(210)",1210},
        {"无内存可用(212)",1212},
        {"无响应(0x08)",4008},
        {"无响应(0x08)",6008},
        {"无响应(0x08)",7008},
        {"无响应(0x08)",8008},
        {"无响应(0x08)",5008},
        {"系统失败(59/204)",1059},
        {"系统失败(59/204)",1204},
        {"系统失败(59/204)",3059},
        {"系统失败(59/204)",3204},
        {"相关功能未实现(004)",12004},
        {"消息不支持(0x88)",6136},
        {"消息格式损坏(0x83)",6131},
        {"消息格式无效(193)",1193},
        {"消息格式无效(193)",3193},
        {"消息格式无效(193)",2193},
        {"消息过长(0x09)",4009},
        {"消息过长(0x09)",6009},
        {"消息过长(0x09)",7009},
        {"消息过长(0x09)",8009},
        {"消息过长(0x09)",5009},
        {"消息未找到(0x85)",6133},
        {"协议错误(0x01)",4001},
        {"协议错误(0x01)",6001},
        {"协议错误(0x01)",7001},
        {"协议错误(0x01)",8001},
        {"协议错误(0x01)",5001},
        {"协议错误，非法PDU接收(0xE0)",4224},
        {"协议错误，非法PDU接收(0xE0)",6224},
        {"协议错误，非法PDU接收(0xE0)",7224},
        {"协议错误，非法PDU接收(0xE0)",8224},
        {"协议错误，非法PDU接收(0xE0)",5224},
        {"业务请求网络无响应",4901},
        {"业务请求网络无响应",5901},
        {"用户鉴权失败(209)",1209},
        {"用户拒绝Push消息，无特别原因。(0xEB)",4235},
        {"用户拒绝Push消息，无特别原因。(0xEB)",6235},
        {"用户拒绝Push消息，无特别原因。(0xEB)",7235},
        {"用户拒绝Push消息，无特别原因。(0xEB)",8235},
        {"用户拒绝Push消息，无特别原因。(0xEB)",5235},
        {"用户忙，不能处理SDU(0xE4)",4228},
        {"用户忙，不能处理SDU(0xE4)",6228},
        {"用户忙，不能处理SDU(0xE4)",7228},
        {"用户忙，不能处理SDU(0xE4)",8228},
        {"用户忙，不能处理SDU(0xE4)",5228},
        {"用户请求放弃(0xE8)",4232},
        {"用户请求放弃(0xE8)",6232},
        {"用户请求放弃(0xE8)",7232},
        {"用户请求放弃(0xE8)",8232},
        {"用户请求放弃(0xE8)",5232},
        {"用户请求放弃(0xEA)",4234},
        {"用户请求放弃(0xEA)",6234},
        {"用户请求放弃(0xEA)",7234},
        {"用户请求放弃(0xEA)",8234},
        {"用户请求放弃(0xEA)",5234},
        {"用户确认不支持(0x05)",4005},
        {"用户确认不支持(0x05)",6005},
        {"用户确认不支持(0x05)",7005},
        {"用户确认不支持(0x05)",8005},
        {"用户确认不支持(0x05)",5005},
        {"域名不存在(003)",12003},
        {"域名存在(006)",12006},
        {"资源不足(199)",1199},
        {"资源不足(199)",1199},
        {"最大接收单元溢出(0xE6)",4230},
        {"最大接收单元溢出(0xE6)",6230},
        {"最大接收单元溢出(0xE6)",7230},
        {"最大接收单元溢出(0xE6)",8230},
        {"最大接收单元溢出(0xE6)",5230},
        {"最大请求次数溢出(0xE7)",4231},
        {"最大请求次数溢出(0xE7)",6231},
        {"最大请求次数溢出(0xE7)",7231},
        {"最大请求次数溢出(0xE7)",8231},
        {"最大请求次数溢出(0xE7)",5231},
        };

    }
}
